package com.situ.day3;

import org.junit.Test;

public class IfElseDemo {

    @Test
    public void test1() {
        int num1 = 13;
        int num2 = 34;
        int max = 0;
        if (num1 >= num2) {
            max = num1;
        } else {
            max = num2;
        }
        System.out.println("max: " + max);

        int max1 = num1 >= num2 ? num1 : num2;
        System.out.println("max1: " + max1);
    }

    @Test
    public void test3() {
        int age = 26;
        System.out.println("我的年龄是23岁");
        //豆豆加加
        System.out.println("我的年龄是" + age + "岁");
        System.out.println(10 + 20 + "" + 30);//"3030"
        System.out.println("" + 10 + 20 + 30);//102030
    }
}
